package com.mass.waybill.records.dao;

import com.mass.waybill.order.model.WbShippingOrder;
import com.mass.waybill.records.model.WbSterilisationRecords;
import com.mass.waybill.records.model.WbSterilisationRecordsExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: ZSX
 * @Description: 冲销记录  DAO
 */
@Mapper
public interface WbSterilisationRecordsMapper {

    /**
     * 分页查询应收金额
     *
     * @param wbShippingOrder 查询条件
     * @param page            页
     * @param limit           行
     * @return
     */
    List<WbShippingOrder> findReceivables(@Param("wbShippingOrder") WbShippingOrder wbShippingOrder, @Param("page") Integer page, @Param("limit") Integer limit);

    /**
     * 查询行数
     *
     * @param wbShippingOrder
     * @return
     */
    Long findReceivablesCount(@Param("wbShippingOrder") WbShippingOrder wbShippingOrder);

    /**
     * 根据结算编号查询 各个订单合计冲销  orderCode 分组
     *
     * @param settlementNumber
     * @return
     */
    List<WbShippingOrder> findOrderBySettlementNumber(@Param("settlementNumber") String settlementNumber);

    /**
     * 根据结算编号查询 订单冲销明细
     *
     * @param settlementNumber
     * @return
     */
    List<WbShippingOrder> findRecordsInfoBySettlementNumber(@Param("settlementNumber") String settlementNumber);

    /**
     * 批量添加
     *
     * @param list
     * @return
     */
    int insertBatch(List<WbSterilisationRecords> list);

    /**
     * 根据 订单编号查询已冲销金额
     *
     * @param orderCode
     * @return
     */
    String findRecordsByOrderCode(String orderCode);

    /**
     * @mbg.generated
     */
    long countByExample(WbSterilisationRecordsExample example);

    /**
     * @mbg.generated
     */
    int deleteByExample(WbSterilisationRecordsExample example);

    /**
     * @mbg.generated
     */
    int deleteByPrimaryKey(Long id);

    /**
     * @mbg.generated
     */
    int insert(WbSterilisationRecords record);

    /**
     * @mbg.generated
     */
    int insertSelective(WbSterilisationRecords record);

    /**
     * @mbg.generated
     */
    List<WbSterilisationRecords> selectByExample(WbSterilisationRecordsExample example);

    /**
     * @mbg.generated
     */
    WbSterilisationRecords selectByPrimaryKey(Long id);

    /**
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("record") WbSterilisationRecords record, @Param("example") WbSterilisationRecordsExample example);

    /**
     * @mbg.generated
     */
    int updateByExample(@Param("record") WbSterilisationRecords record, @Param("example") WbSterilisationRecordsExample example);

    /**
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(WbSterilisationRecords record);

    /**
     * @mbg.generated
     */
    int updateByPrimaryKey(WbSterilisationRecords record);
}